import 'package:flutter/material.dart';
import 'package:get/get.dart';

class SearchPage extends StatefulWidget {
  const SearchPage({Key? key}) : super(key: key);

  @override
  State<SearchPage> createState() => _SearchPageState();
}

class _SearchPageState extends State<SearchPage> {
  @override
  Widget build(BuildContext context) {
    EdgeInsets padding = MediaQuery.paddingOf(context);

    return Scaffold(
      body: Container(
        padding: padding,
        decoration: BoxDecoration(
          color: Colors.white,
        ),
        child: Column(
          children: [
            Container(
              padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
              child: Row(
                children: [
                  Expanded(
                    child: SizedBox(height: 38,child: TextField(
                      decoration: InputDecoration(
                        hintText: '搜索智能体',
                        enabledBorder: OutlineInputBorder(
                            borderRadius: BorderRadius.circular(19),
                            borderSide: const BorderSide(style: BorderStyle.none)
                        ),
                        focusedBorder: OutlineInputBorder(
                            borderRadius: BorderRadius.circular(19),
                            borderSide: const BorderSide(style: BorderStyle.none)
                        ),
                        fillColor: Color(0x50dddddd),
                        filled: true,
                        contentPadding: EdgeInsets.symmetric(horizontal: 20),
                      ),
                    ),),
                  ),
                  SizedBox(width: 10),
                  InkWell(
                    onTap: () => Get.back(),
                    child: Text('取消'),
                  ),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
